package com.caocaog.market.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.system.base.entity.groups.InsertGroup;
import org.jeecg.common.system.base.entity.groups.UpdateGroup;
import org.jeecg.common.system.base.entity.AllEntity;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 商品分类
 *
 * @author chechen
 * @date 2022-04-13
 */
@Data
@TableName("mk_goods_sort")
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "mk_goods_sort对象", description = "商品分类")
public class GoodsCategories extends AllEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @NotNull(message = "更新时，id不能为空", groups = {UpdateGroup.class})
    @ApiModelProperty("ID")
    private String id;

    @ApiModelProperty(value = "店铺id")
    @Dict(dictTable = "mk_shop_basic",dicCode = "id",dicText = "name")
    private String shopId;

    @ApiModelProperty(value = "属性名称")
    @NotNull(message = "属性名称不能为空", groups = {InsertGroup.class})
    private String name;

    @ApiModelProperty(value = "备注")
    private String mark;

    @Dict(dicCode = "mk_whether")
    @ApiModelProperty(value = "是否显示")
    private String isShow;

    @ApiModelProperty(value = "排序")
    private Integer sort;

}
